<template>
  <el-dialog title="批量添加代理" :visible.sync="visible" width="66%" @open="onOpen" :before-close="onCancel">
    <el-input type="textarea" :rows="12" placeholder="每一行格式：protocol://ip:port:username:password
    socks5://192.168.1.1:8262:abcd:123456
    socks5://192.168.1.1:8262:abcd:123456
    http://192.168.1.1:8262:abcd:123456
    http://192.168.1.1:8262:abcd:123456" v-model="proxyText">
    </el-input>
    <span slot="footer" class="dialog-footer">
      <el-button @click="onCancel">取 消</el-button>
      <el-button type="primary" @click="onConfirm">确 定</el-button>
    </span>
  </el-dialog>
</template>

<script>

export default {
  props: {
    visible: { type: Boolean, default: false },
  },
  data() {
    return {
      formLabelWidth: '120px',
      proxyText: "",
    }
  },
  methods: {
    onCancel() {
      this.$emit("on-dismiss")
    },
    async onConfirm() {
      this.$emit("on-dismiss", this.proxyText)
    },
    onOpen() {
      this.proxyText = ""
    },
  }
}
</script>



<style lang="scss" scoped>
.version-update {
  &-info {
    margin-left: 10px;
    margin-top: 10px;
    justify-content: flex-start;
    flex-direction: column;
    align-items: flex-start;
  }

  &-footer {
    margin-right: 60px;
  }
}
</style>